Skip to main content

Counts

Counts[list] gives an association whose keys are the distinct elements of list, and whose values give the number of times those elements appear in list.

Counts[list,elems] gives an association whose keys are the distinct elements in elems, and whose values give the number of times those elements appear in list.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.